home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / c / dirscan.com / PEPTO.TXT < prev    next >
Encoding:
Text File  |  1989-04-08  |  4.2 KB  |  85 lines

  1. -----------------------------------------------------------------------------
  2.                                 Description
  3. -----------------------------------------------------------------------------
  4.    PEPTO is designed to shrink C source files.  It does a very good job of it
  5.    and it does it quickly.  I have found it very useful for reducing space
  6.    requirements and decreasing compile times by PEPTOing the system header
  7.    files.  (Windows and PM programmers take note!)
  8.  
  9.    PEPTO can also be very useful distributing secure copies of source code.
  10.    The sender can change the major variable names throughout the file via his
  11.    favorite editor's search-and-replace function, then PEPTO it.  The result
  12.    is a virtually indecipherable source file which is still compilable!
  13.  
  14. -----------------------------------------------------------------------------
  15.                                   Usage
  16. -----------------------------------------------------------------------------
  17.    PEPTO is very simple to use.  Just enter the file name(s) you wish to
  18.    compress on the command line.  For example:
  19.  
  20.    PEPTO STDIO.H WINDOWS.H
  21.  
  22.    Two new files will be created, STDIO.PEP and WINDOWS.PEP
  23.  
  24.    PEPTO has an option (/C) which you can use if you do not wish lines in
  25.    the source file to be concatenated.  This can be useful if you wish to
  26.    edit the PEPTOed file or if your compiler barfs out on long lines.  If
  27.    you wish to use this option be sure to enter it first on the command
  28.    line.  As in our previous example, you would enter:
  29.  
  30.    PEPTO /C STDIO.H WINDOWS.H
  31.  
  32. -----------------------------------------------------------------------------
  33.                                Some caveats
  34. -----------------------------------------------------------------------------
  35.    PEPTO was designed to compress Turbo C source files.  Turbo C does not
  36.    impose a limit on the length of a source line.  Other compilers might.
  37.    Let me know if this is a problem.  I can add a command line switch to
  38.    limit the line length.
  39.  
  40.    PEPTO cannot always handle comments which are implemented with #if FALSE.
  41.    The problem occurs when an open comment (/*), open string ("), or character
  42.    constant (') appears within the #if...#endif block.  Very few people use
  43.    the #if FALSE technique for creating comment blocks so I don't think this
  44.    will ever be a problem.
  45.  
  46.    Examples:
  47.    #if 0
  48.    This is a comment which will work OK.
  49.    #endif
  50.  
  51.    #if 0
  52.    This is a comment which will NOT work /*.
  53.    #endif
  54.  
  55.    Note to Turbo C programmers who use inline assembler:
  56.    PEPTO understands inline assembler lines which begin with 'asm'.  Some
  57.    programmers prefer to '#define I asm' to save typing.  PEPTO cannot
  58.    understand this and so inline assembler lines will be parsed as regular
  59.    C lines (which means they will be joined together) and won't assemble
  60.    properly.  This isn't a real problem since this doesn't happen often
  61.    in include files and if it does, the programmer can change the macro'ed
  62.    asm to just plain asm before PEPTOing it.  If this is not acceptable
  63.    use the /C option so that pepto will not concatenate source lines.
  64.  
  65.    PEPTO will refuse to accept .PEP files as input.
  66.  
  67. -----------------------------------------------------------------------------
  68.                          And now the begging...
  69. -----------------------------------------------------------------------------
  70.    Please send your comments and suggestions to me.  I created it for my own
  71.    use (necessity is a mother!) but it is something which can benefit others
  72.    so I have decided to release it as shareware.  If you find PEPTO to be a
  73.    useful utility please let me know.  You may distribute this program as
  74.    freely as you like but if you use it please take the time to send five
  75.    dollars to my address below.  Please help support my efforts and those
  76.    of all shareware authors.  C source to PEPTO is available for a paltry
  77.    twenty five dollars plus shipping costs.
  78.  
  79.                         David Stafford
  80.                         Research and Development
  81.                         1800 Green Hills Rd.
  82.                         Scotts Valley, CA 95066
  83.  
  84.    You can reach me on CIS at 72411,2670 or MCI mail as DSTAFFORD.
  85.